package cn.yangke.org.domain;

import cn.yangke.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author YangKe
 * @Date 2022/6/1 13:49
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Department extends BaseDomain {

    private String sn;

    private String name;

    //我的儿子们,注解意思是 集合不为空才返回
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children = new ArrayList<>();

    private String dirPath;
    private Integer state;

    private Long manager_id;
    //部门管理员
    private Employee manager;

    private Long parent_id;
    //上级部门
    private Department parent;

    private Long shop_id;

}
